<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      /*
      替换字符串中的字符
      replace 参数说明
      1. 要替换的字符串
      2. 替换成什么字符串
      */
      const str = "1a2a3a4a";
      console.log(
        str
          .replace("a", "b")
          .replace("a", "b")
          .replace("a", "b")
          .replace("4a", "3b")
      );
    </script>
  </body>
</html>
